﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class ExitRoomReq : Message
    {
        public static int TYPE = 12;
        public static int ID = 29;

        public static ExitRoomReq create(int userid)
        {
            var temp = new ExitRoomReq();
            temp.userId = userid;
            return temp;
        }

        public int userId { get; set; }

        public void decode(Input _in)
        {
        }

        public void encode(Output _out)
        {
            _out.writeInt(userId);
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "ExitRoomReq [CreateUserId="+userId+"]";
        }
    }
}